home *** CD-ROM | disk | FTP | other *** search
/ Turnbull China Bikeride / Turnbull China Bikeride - Disc 1.iso / ARGONET / PD / PROGRAMMING / DESKLIBC / SOURCES.ZIP / DeskLib / !DLSources / Libraries / Str / s / strcpycr < prev   
Text File  |  1995-08-26  |  1KB  |  37 lines

  1. ;   ####             #    #     # #
  2. ;   #   #            #    #       #          The FreeWare C library for
  3. ;   #   #  ##   ###  #  # #     # ###             RISC OS machines
  4. ;   #   # #  # #     # #  #     # #  #   ___________________________________
  5. ;   #   # ####  ###  ##   #     # #  #
  6. ;   #   # #        # # #  #     # #  #    Please refer to the accompanying
  7. ;   ####   ### ####  #  # ##### # ###    documentation for conditions of use
  8. ;   ________________________________________________________________________
  9. ;
  10. ;   File:    Str.strcpycr.s
  11. ;   Author:  Copyright © 1993 Ainsley Pereira
  12. ;   Version: 1.01 (05 Mar 1994)
  13. ;   Purpose: Copies a CR-terminated string - note that this will change the
  14. ;            terminator of the result to a NUL (0).
  15.  
  16.  
  17.         GET     ^.h.regdefs
  18.         GET     ^.h.swinos
  19.         GET     ^.h.macros
  20.  
  21.         PREAMBLE
  22.         STARTCODE strcpycr
  23.  
  24.         STMFD   sp!, {v1,lr}
  25.         MOV     v1,#0
  26. strcpycr_00
  27.         LDRB    ip,[a2,v1]
  28.         CMP     ip,#31
  29.         STRGTB  ip,[a1,v1]
  30.         ADDGT   v1,v1,#1
  31.         BGT     strcpycr_00
  32.         MOV     ip,#0
  33.         STRB    ip,[a1,v1]
  34.         LDMFD   sp!, {v1,pc}^
  35. ;
  36.         END
  37.